#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back

using namespace std;

typedef long long ll;
typedef double db;
typedef vector < int > vec;
typedef pair < int , int > pii;

int read() {
    int x = 0; bool f = 0; char ch = getchar(); while(!isdigit(ch)) f |= ch == '-',ch = getchar();
    while(isdigit(ch)) x = x * 10 + (ch ^ 48),ch = getchar(); return f ? -x : x;
}

const int N = 20;
const int S = 1 << N;

db dp[2][S];
int U,p[N][N],n;

int main() {
#ifndef ONLINE_JUDGE
    freopen("1.in","r",stdin);
#endif
    n = in; U = 1 << n; for(int i = 0;i < n;i++) for(int j = 0;j < n;j++) p[i][j] = in;
    dp[0][0] = 1; int o = 0;
    for(int i = 0;i < n;i++,o ^= 1) {
	memset(dp[o ^ 1],0,sizeof dp[o ^ 1]);
	for(int s = 0;s < U;s++)
	    if(__builtin_popcount(s) == i)
		for(int j = 0;j < n;j++)
		    if(!(s >> j & 1))
			dp[o ^ 1][s | 1 << j] = max(dp[o ^ 1][s | 1 << j],dp[o][s] * p[i][j] / 100.0);
    }
    printf("%.7lf\n",dp[o][U - 1] * 100); return 0;
}
